<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class PropertyDef</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Interface PropertyDef</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A <a href="../phpContentRepository/Property.html">Property</a> definition. Used in <a href="../phpContentRepository/Node.html">Node</a> type definitions.</p>
	<ul class="tags">
				<li><span class="field">copyright:</span> Copyright &amp;copy; 2004-2005, Domain51</li>
				<li><span class="field">author:</span> PHP - Travis Swicegood &lt;<a href="mailto:travis@domain51.net">travis@domain51.net</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_nodetype_PropertyDef_interface_php.html">/nodetype/PropertyDef.interface.php</a> (line <span class="field">40</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">object
 A</span>
										<a href="#getDeclaringNodeType" title="details" class="method-name">getDeclaringNodeType</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">object|null</span>
										<a href="#getDefaultValue" title="details" class="method-name">getDefaultValue</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">string|null</span>
										<a href="#getName" title="details" class="method-name">getName</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#getOnParentVersion" title="details" class="method-name">getOnParentVersion</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#getRequiredType" title="details" class="method-name">getRequiredType</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">string|null</span>
										<a href="#getValueConstraint" title="details" class="method-name">getValueConstraint</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isAutoCreate" title="details" class="method-name">isAutoCreate</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isMandatory" title="details" class="method-name">isMandatory</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isMultiple" title="details" class="method-name">isMultiple</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isPrimaryItem" title="details" class="method-name">isPrimaryItem</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isReadOnly" title="details" class="method-name">isReadOnly</a>
										()
									</div>
							</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodgetDeclaringNodeType" id="getDeclaringNodeType"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getDeclaringNodeType</span> (line <span class="line-number">49</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the <a href="../phpContentRepository/NodeType.html">NodeType</a> that contains the declaration of this  <a href="../phpContentRepository/PropertyDef.html">PropertyDef</a>.</p>
	<ul class="tags">
				<li><span class="field">return:</span> <a href="../phpContentRepository/NodeType.html">NodeType</a> object.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">object
 A</span>
		<span class="method-name">
			getDeclaringNodeType
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetDefaultValue" id="getDefaultValue"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getDefaultValue</span> (line <span class="line-number">166</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the default value of the <a href="../phpContentRepository/Property.html">Property</a>.</p>
<p class="description"><p>This is the value that the <a href="../phpContentRepository/Property.html">Property</a> will be assigned if it is  either automatically created, or created without a specified initial  value.</p><p>If NULL, then the <a href="../phpContentRepository/Property.html">Property</a> has no fixed default  value. Note that this does not exclude the possibility that the  <a href="../phpContentRepository/Property.html">Property</a> still assumes some value automatically, but that value  may be variable (for example, &quot;the current date&quot;) and hence cannot be  expressed as a single fixed value.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">object|null</span>
		<span class="method-name">
			getDefaultValue
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetName" id="getName"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getName</span> (line <span class="line-number">62</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the name of the <a href="../phpContentRepository/Property.html">Property</a> that this definition applies to.</p>
<p class="description"><p>If NULL, then this <a href="../phpContentRepository/PropertyDef.html">PropertyDef</a> defines a residual  set of <a href="../phpContentRepository/Property.html">Property</a>s. That is, it defines the characteristics of all  those <a href="../phpContentRepository/Property.html">Property</a>s with names apart from the names explicitly used in  other <a href="../phpContentRepository/Property.html">Property</a> or child <a href="../phpContentRepository/NodeDef.html">NodeDef</a>s.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|null</span>
		<span class="method-name">
			getName
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetOnParentVersion" id="getOnParentVersion"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getOnParentVersion</span> (line <span class="line-number">218</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the on-parent-version status of the <a href="../phpContentRepository/Property.html">Property</a>.</p>
<p class="description"><p>This governs what to do if the parent <a href="../phpContentRepository/Node.html">Node</a> of this  <a href="../phpContentRepository/Property.html">Property</a> is versioned; an <a href="../phpContentRepository/Level2/OnParentVersionAction.html">OnParentVersionAction</a>.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getOnParentVersion
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetRequiredType" id="getRequiredType"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getRequiredType</span> (line <span class="line-number">84</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the required type of the <a href="../phpContentRepository/Property.html">Property</a>. One of:</p>
<p class="description"><p><ul><li><a href="../phpContentRepository/PropertyType.html#constSTRING">PropertyType::STRING</a></li><li><a href="../phpContentRepository/PropertyType.html#constDATE">PropertyType::DATE</a></li><li><a href="../phpContentRepository/PropertyType.html#constBINARY">PropertyType::BINARY</a></li><li><a href="../phpContentRepository/PropertyType.html#constDOUBLE">PropertyType::DOUBLE</a></li><li><a href="../phpContentRepository/PropertyType.html#constLONG">PropertyType::LONG</a></li><li><a href="../phpContentRepository/PropertyType.html#constBOOLEAN">PropertyType::BOOLEAN</a></li><li><a href="../phpContentRepository/PropertyType.html#constSOFTLINK">PropertyType::SOFTLINK</a></li><li><a href="../phpContentRepository/PropertyType.html#constREFERENCE">PropertyType::REFERENCE</a></li><li><a href="../phpContentRepository/PropertyType.html#constUNDEFINED">PropertyType::UNDEFINED</a></li></ul></p><p><a href="../phpContentRepository/PropertyType.html#constUNDEFINED">PropertyType::UNDEFINED</a> is returned if this <a href="../phpContentRepository/Property.html">Property</a> may  be of any type.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getRequiredType
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodgetValueConstraint" id="getValueConstraint"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getValueConstraint</span> (line <span class="line-number">148</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the constraint string. This string describes the constraints  that exist on future values of the <a href="../phpContentRepository/Property.html">Property</a>.</p>
<p class="description"><p>Reporting of value constraints is optional. An implementation  is free to return NULL to this call, indicating that value  constraint information is unavailable (though a constraint may still  exist).</p><p>If a string is returned then it is interpreted in different ways  depending on the type specified for this <a href="../phpContentRepository/Property.html">Property</a>. The following  describes the value constraint syntax for each <a href="../phpContentRepository/Property.html">Property</a> type:</p><p>&lt;dl&gt;    &lt;dt&gt;<a href="../phpContentRepository/PropertyType.html#constSTRING">PropertyType::STRING</a>&lt;/dt&gt;    &lt;dd&gt;The constraint string is a regular expression pattern. For example        the regular expression &quot;.*&quot; means any string&quot;.  See        <a href="http://www.php.net/preg_match">http://www.php.net/preg_match</a> for full explanations of        regular expressions inside PHP.&lt;/dd&gt;</p><p>&lt;dt&gt;<a href="../phpContentRepository/PropertyType.html#constREFERENCE">PropertyType::REFERENCE</a>&lt;/dt&gt;    &lt;dd&gt;The constraint string is a comma separated list of <a href="../phpContentRepository/NodeType.html">NodeType</a>        names. For example &quot;nt:authored, mynt:newsArticle&quot;.&lt;/dd&gt;</p><p>&lt;dt&gt;<a href="../phpContentRepository/PropertyType.html#constBOOLEAN">PropertyType::BOOLEAN</a>&lt;/dt&gt;    &lt;dd&gt;Either TRUE or FALSE.&lt;/dd&gt;  &lt;/dl&gt;</p><p>The remaining types all have value constraints in the form of inclusive  or exclusive ranges: i.e., &quot;[min, max]&quot;,  &quot;(min, max)&quot;, &quot;(min,  max]&quot; or &quot;[min, max)&quot;.  Where &quot;[&quot; and &quot;]&quot; indicate &quot;inclusive&quot;, while  &quot;(&quot; and &quot;)&quot; indicate &quot;exclusive&quot;.</p><p>A missing min or max value  indicates no bound in that direction. For example [,5]  means no minimum but a maximum of 5 (inclusive).  The syntax and meaning of the min and  max values themselves differs between types as  follows:</p><p>&lt;dl&gt;    &lt;dt&gt;<a href="../phpContentRepository/PropertyType.html#constBINARY">PropertyType::BINARY</a>&lt;/dt&gt;    &lt;dd&gt;min and max specify the        allowed size range of the binary value in bytes.&lt;/dd&gt;</p><p>&lt;dt&gt;<a href="../phpContentRepository/PropertyType.html#constDATE">PropertyType::DATE</a>&lt;/dt&gt;    &lt;dd&gt;min and max are dates        specifiying the allowed date range. The date strings must be in the        ISO8601-compliant format:        YYYY-MM-DDThh:mm:ss.sssTZD.&lt;/dd&gt;</p><p>&lt;dt&gt;<a href="../phpContentRepository/PropertyType.html#constLONG">PropertyType::LONG</a>, <a href="../phpContentRepository/PropertyType.html#constINT">PropertyType::INT</a>,        <a href="../phpContentRepository/PropertyType.html#constFLOAT">PropertyType::FLOAT</a>, <a href="../phpContentRepository/PropertyType.html#constDOUBLE">PropertyType::DOUBLE</a>&lt;/dt&gt;    &lt;dd&gt;min and max are        numbers.&lt;/dd&gt;  &lt;/dl&gt;</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|null</span>
		<span class="method-name">
			getValueConstraint
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodisAutoCreate" id="isAutoCreate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isAutoCreate</span> (line <span class="line-number">179</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reports whether the <a href="../phpContentRepository/Property.html">Property</a> is to be automatically created when  its parent <a href="../phpContentRepository/Node.html">Node</a> is created.</p>
<p class="description"><p>If TRUE then this <a href="../phpContentRepository/PropertyDef.html">PropertyDef</a> will necessarily  not  be a residual set definition but will specify an actual <a href="../phpContentRepository/Property.html">Property</a>  name (in other words <a href="../phpContentRepository/PropertyDef.html#methodgetName">getName()</a> will return a non-null value).</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isAutoCreate
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodisMandatory" id="isMandatory"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">isMandatory</span> (line <span class="line-number">207</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reports whether the <a href="../phpContentRepository/Property.html">Property</a> is mandatory.</p>
<p class="description"><p>A mandatory <a href="../phpContentRepository/Property.html">Property</a> is one that, if its parent <a href="../phpContentRepository/Node.html">Node</a>  exists, must also exist. It cannot be removed through this API except by  removing its parent. An attempt to save a <a href="../phpContentRepository/Node.html">Node</a> that has a  mandatory <a href="../phpContentRepository/Property.html">Property</a> without first creating that <a href="../phpContentRepository/Property.html">Property</a>,  will throw a <a href="../phpContentRepository/Exceptions/ConstraintViolationException.html">ConstraintViolationException</a> on <a href="../phpContentRepository/Node.html#methodsave">Node::save()</a>.</p><p>If a <a href="../phpContentRepository/Property.html">Property</a> is mandatory then the following restrictions must be  enforced:  <ul><li>If autoCreate is FALSE then the client
       must ensure that the <a href="../phpContentRepository/Property.html">Property</a> is created (and if no default
       value is indicated, given a value) before the parent <a href="../phpContentRepository/Node.html">Node</a> is
       saved, otherwise a <a href="../phpContentRepository/Exceptions/ConstraintViolationException.html">ConstraintViolationException</a> will be
       thrown on <a href="../phpContentRepository/Node.html#methodsave">Node::save()</a>.</li><li>Once created, the <a href="../phpContentRepository/Property.html">Property</a> cannot be removed without
       removing its parent <a href="../phpContentRepository/Node.html">Node</a>, otherwise a
       <a href="../phpContentRepository/Exceptions/ConstraintViolationException.html">ConstraintViolationException</a> is thrown on
       <a href="../phpContentRepository/Node.html#methodsave">Node::save()</a>.</li></ul></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isMandatory
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodisMultiple" id="isMultiple"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isMultiple</span> (line <span class="line-number">255</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reports whether this <a href="../phpContentRepository/Property.html">Property</a> can have multiple values.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isMultiple
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodisPrimaryItem" id="isPrimaryItem"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">isPrimaryItem</span> (line <span class="line-number">247</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reports whether this <a href="../phpContentRepository/Property.html">Property</a> is the primary child item of its  parent <a href="../phpContentRepository/Node.html">Node</a>.</p>
<p class="description"><p>Since any given <a href="../phpContentRepository/Node.html">Node</a> may have either zero or one primary child  <a href="../phpContentRepository/Item.html">Item</a>s, this means that a maximum of one <a href="../phpContentRepository/PropertyDef.html">PropertyDef</a> or  <a href="../phpContentRepository/NodeDef.html">NodeDef</a> within a particular <a href="../phpContentRepository/NodeType.html">NodeType</a> may return  TRUE on this call.</p><p>The primary child item flag is used by the method  <a href="../phpContentRepository/Node.html#methodgetPrimaryItem">Node::getPrimaryItem()</a>.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isPrimaryItem
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodisReadOnly" id="isReadOnly"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isReadOnly</span> (line <span class="line-number">230</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reports whether the <a href="../phpContentRepository/Property.html">Property</a> is read-only.</p>
<p class="description"><p>A read-only <a href="../phpContentRepository/Property.html">Property</a> cannot be written-to via this API. It may be  written to, however, by the implementation itself via some mechanism not  specified by this specification.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			isReadOnly
		</span>
				()
			</div>
	
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 31 Dec 2004 10:15:20 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>